#ifndef __LXZ_URC_TABLE_H__
#define __LXZ_URC_TABLE_H__

#define LXZAT_MAX_URC_SIZE 500
#define LXZAT_MAX_URC_RING_READ_SIZE 1024
#define LXZAT_URC_RING_WRITE_LEN 128

typedef sint32 (*lxzurc_callback_f_handler_t)(void * pctxt);

typedef struct _lxzurc_info_t 
{
    uint08 * pt_urc_keyword;
    lxzurc_callback_f_handler_t fp_urc_handler;
}lxzurc_info_t;


typedef sint32 (*lxzat_callback_exec_t)(sint32 p1, sint32 p2);
typedef sint32 (*lxzat_callback_exit_t)(sint32 p1, sint32 p2);


typedef struct _lxzat_task_t
{
	lxzat_callback_exec_t    fp_exec;
	lxzat_callback_exit_t    fp_exit;
	sint32                   sparam1;
    sint32                   sparam2;
	struct _lxzat_task_t * 	 next;
}lxzat_task_t;

/*
 *  Description:
 *    Get an urc-information descriptor.
 *  Param: i_index_id, a specified index
 *  Return: an urc-information descriptor;
 */
const lxzurc_info_t * lxzurc_info_f_get(sint32 i_index_id);

/*
 *  Description:
 *    Insert a task into task-list.
 *  Param: p_new_task, the task that will be inserted.
 *  Return: i_op_status, 0, fail;1, success.
 */
sint32 lxzat_task_f_create(lxzat_task_t * p_new_task);

/*
 *  Description:
 *    Remove the specified task from task-list.
 *  Param: p_dst_task, the task that will be removed.
 *  Return: i_op_status, 0, fail;1, success.
 */
sint32 lxzat_task_f_destroy(lxzat_task_t * p_dst_task);

/*
 *  Description:
 *    Destroy all tasks that included in task-list.
 *  Param: NONE
 *  Return: i_op_status, 0, fail;1, success.
 */
sint32 lxzat_task_f_destroyall(void);

/*
 *  Description:
 *    All tasks that included in list should be done one time in a cycle.
 *  Param: NONE
 *  Return: NONE;
 */
void lxzat_task_f_DoCycle(void);

#endif /* __LXZ_URC_TABLE_H__ */